<?php
 
include('top.php');
require_once('pasmy/dbwaarden.php');
?> 
<h2><div style="text-align: center"><?php echo $dbzoeken[$taal];?></div></h2>
<?php
echo "<br><br>";
$mysql_id = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($db, $mysql_id);

if($taal == fr) {
$maanden = array("-----","Janvier","Fevrier","Mars","Avril","Mai","Juin","Julliet","Aout","Septembre","Octobre","Novembre","Decembre");
}
else {
$maanden = array("-----","Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December");
}

$dagen = array("-----","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31");

$jaren = array("-----","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020");

$huidigJaar = date(Y);
$gebruikDB = "vnzvrn" . $huidigJaar;
//echo "Huidig Jaar = $gebruikDB<br>";
 
$chtel = 0;
$kenteken[0] = "-----";
$chtel++;
$sql = "select nrpl from nummerplaten where klas='porteur' and firma='vanzeveren'";
$res = mysql_query($sql, $mysql_id);
while ($row = mysql_fetch_row($res)) {
	$kenteken[$chtel]=$row[0];
	$chtel++;
	}
asort($kenteken);

$sql = "select nrpl from nummerplaten where klas='trekker' and firma='vanzeveren'";
$res = mysql_query($sql, $mysql_id);
while ($row = mysql_fetch_row($res)) {
	$kenteken[$chtel]=$row[0];
	$chtel++;
	}

$sql = "select nrpl from nummerplaten where firma='roussel'";
$res = mysql_query($sql, $mysql_id);
while ($row = mysql_fetch_row($res)) {
	$kenteken[$chtel]=$row[0];
	$chtel++;
	}	
$sql = "select driver from  $gebruikDB";
$res = mysql_query($sql, $mysql_id);
$chtel=0;
$Drivers[$chtel]="";
$chtel++;
while ($row = mysql_fetch_row($res)) {
	$Drivers[$chtel]=$row[0];
	$chtel++;
	}

asort($Drivers);
$DriversU = array_unique($Drivers);
?>
<table align="center">
<form action="zoeken3.php" method="post">
<tr>
<td><strong>Chauffeur</strong></td>
<td>
<select name="driver">
<?php
while(list($key, $val)=each($DriversU)) 
{
		echo '<option value="'.$val.'">'.$val.'</option>';
}
?></select>

<!-- <input type="text" name="driver" size="25" maxlength="40" /> -->
</td>
</tr>

<tr>
<td><strong>Camion</strong></td>
<td>
 
<select name="nrpl">
<?php
while(list($key, $val)=each($kenteken)) {
	if (isset($nrpl) && ($nrpl == $val)) {
		echo '<option value="'.$val.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$val.'">'.$val.'</option>';
	}
}
?></select>

</td>
</tr>


<tr>
<td><strong><?php echo $jaar[$taal];?></strong></td>
<td>
<?php $jaartal = date("Y");?>
<input type="text" name="jaar" size="10" maxlength="40" value="<?php echo $jaartal;?>"/>
</td>
</tr>
<tr>
<td><strong><?php echo $datum[$taal];?></strong></td>
<td>

<select name="jj">
<?php
while(list($key, $val)=each($dagen)) {
	if (isset($dagen) && ($dagen == $val)) {
		echo '<option value="'.$val.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$val.'">'.$val.'</option>';
	}
}
?></select>

<!-- <input type="text" name="jj" size="2" maxlength="2" /> -->&nbsp;

<select name="mm">
<?php
while(list($key, $val)=each($maanden)) {
	if (isset($maanden) && ($maanden == $val)) {
		echo '<option value="'.$key.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$key.'">'.$val.'</option>';
	}
}
?></select>

<!-- <input type="text" name="mm" size="2" maxlength="2" /> -->&nbsp;

<select name="yy">
<?php
while(list($key, $val)=each($jaren)) {
	if (isset($jaren) && ($jaren == $val)) {
		echo '<option value="'.$val.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$val.'">'.$val.'</option>';
	}
}
?></select>

<!-- <input type="text" name="yy" size="4" maxlength="4" /> -->

</td>
</tr>
<tr>
<td><strong>Periode</strong></td>
<td>
<strong><?php echo $van[$taal];?></strong>&nbsp;&nbsp;

<?php reset($dagen);reset($maanden);reset($jaren);?>

<select name="jj1">
<?php
while(list($key, $val)=each($dagen)) {
	if (isset($dagen) && ($dagen == $val)) {
		echo '<option value="'.$val.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$val.'">'.$val.'</option>';
	}
}
?>
</select>

<!-- <input type="text" name="jj" size="2" maxlength="2" /> -->&nbsp;

<select name="mm1">
<?php
while(list($key, $val)=each($maanden)) {
	if (isset($maanden) && ($maanden == $val)) {
		echo '<option value="'.$key.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$key.'">'.$val.'</option>';
	}
}
?></select>

<!-- <input type="text" name="mm" size="2" maxlength="2" /> -->&nbsp;

<select name="yy1">
<?php
while(list($key, $val)=each($jaren)) {
	if (isset($jaren) && ($jaren == $val)) {
		echo '<option value="'.$val.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$val.'">'.$val.'</option>';
	}
}
?></select>
 
<strong><?php echo $en[$taal];?></strong>&nbsp;&nbsp;
<?php reset($dagen);reset($maanden);reset($jaren);?>
<select name="jj2">
<?php
while(list($key, $val)=each($dagen)) {
	if (isset($dagen) && ($dagen == $val)) {
		echo '<option value="'.$val.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$val.'">'.$val.'</option>';
	}
}
?></select>

<!-- <input type="text" name="jj" size="2" maxlength="2" /> -->&nbsp;

<select name="mm2">
<?php
while(list($key, $val)=each($maanden)) {
	if (isset($maanden) && ($maanden == $val)) {
		echo '<option value="'.$key.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$key.'">'.$val.'</option>';
	}
}
?></select>

<!-- <input type="text" name="mm" size="2" maxlength="2" /> -->&nbsp;

<select name="yy2">
<?php
while(list($key, $val)=each($jaren)) {
	if (isset($jaren) && ($jaren == $val)) {
		echo '<option value="'.$val.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$val.'">'.$val.'</option>';
	}
}
?></select>
<!-- <input type="text" name="jj2" size="2" maxlength="2" />&nbsp; -->
<!-- <input type="text" name="mm2" size="2" maxlength="2" />&nbsp; -->
<!-- <input type="text" name="yy2" size="4" maxlength="4" /> -->
</td>
</tr>
<tr>
<td><strong><?php echo $referentie[$taal];?></strong></td>
<td><input type="text" name="ref" size="15" /></td>
</tr>

<tr>
<td><strong>CMR</strong></td>
<td><input type="text" name="cmr" size="15" /></td>
</tr>

<tr>
<td><strong><?php echo $klant[$taal];?></strong></td>
<td><input type="text" name="client" size="15" /></td>
</tr>
<tr>
<td><strong><?php echo $verzender[$taal];?></strong></td>
<td><input type="text" name="expedi" size="15" /></td>
</tr>



<tr>
<td><strong><?php echo $laplaats[$taal];?></strong></td>
<td><input type="text" name="laadplaats" size="15" /></td>
</tr>

<tr>
<td><strong><?php echo $bestemmeling[$taal];?></strong></td>
<td><input type="text" name="desti" size="15" /></td>
</tr>
<tr>
<td><strong><?php echo $plaats[$taal];?></strong></td>
<td><input type="text" name="ville" size="15" /></td>
</tr>
<tr>
<td><strong>Colis</strong></td>
<td><input type="text" name="colis" size="15" /></td>
</tr>
<tr>
<td><strong><?php echo $pals[$taal];?></strong></td>
<td><input type="text" name="pal" size="15" /></td>
</tr>
<tr>
<td><strong><?php echo $vloermeter[$taal];?></strong></td>
<td><input type="text" name="mp" size="15" /></td>
</tr>
<tr>
<td><strong><?php echo $gewicht[$taal];?></strong></td>
<td><input type="text" name="poids" size="15" /></td>
</tr>
<tr>
<td><strong><?php echo $pprijs[$taal];?></strong></td>
<td><input type="text" name="prix" size="15" /></td>
</tr>
<tr>
<td><strong><?php echo $week[$taal];?></strong></td>
<td><input type="text" name="week" size="15" /></td>
</tr>
<tr>
<td><strong>Imprimer les remarques</strong></td>
<td><input type="checkbox" name="remark" value="ok" /></td>
</tr>

<tr><td colspan="2"><br /><div style="text-align: center"><input type="submit" name="zoek" value="<?php echo $zoeken[$taal];?>" /></div></td></tr>
</form>
</table>
<?php
include('footer.php');
?>